/****************************************************
	文件：ExcelKits.cs
	作者：HuskyT
	邮箱：1005240602@qq.com
	日期：2020/9/19 18:16:47
	功能：Excel 工具
*****************************************************/

using System;
using HTFW.Utility.Global;
using UnityEngine;

namespace HTFW.Scheme
{
    public class ExcelKits : Singleton<ExcelKits>
    {
        public static ExcelHandler Create(string excelPath)
        {
            return new ExcelHandler(excelPath);
        }

        public static Type GetType(string typeStr) 
        {
            Type type = null;
            typeStr = typeStr.ToLower();
            switch (typeStr)
            {
                case "int":
                case "int16":
                case "int32":
                case "int64":
                    type = typeof(int);
                    break;
                case "float":
                case "double":
                    type = typeof(float);
                    break;
                case "string":
                    type = typeof(string);
                    break;
                default:
                    Debug.LogError($"GetType error! 尚未定义的类型：{typeStr}");
                    break;
            }

            return type;
        }
    }
}